# Alexander Rødseth <rodseth@gmail.com>, 6. sept 2007, GPL

.text
    /* External functions */
    .extern foobar
    .extern dosomething
    /* Shared functions */
    .global main
    .global dosomething

main:
    push %ebp 
    movl %esp, %ebp
    push %ebx 
    push %esi 
    push %edi

    call foobar

    pop %edi 
    pop %esi 
    pop %ebx 
    movl %ebp, %esp
    pop %ebp 

    ret

dosomething:
    push %ebp 
    movl %esp, %ebp
    push %ebx 
    push %esi 
    push %edi

    call endlessloop

    pop %edi 
    pop %esi 
    pop %ebx 
    movl %ebp, %esp
    pop %ebp 

    ret
